From 1f0c99978fcd9fa3f17717292fd84cc99a7a3aa4 Mon Sep 17 00:00:00 2001 From: "shand@ubuntu.eng.hq.xensource.com" Date: Tue, 13 Sep 2005 10:03:04 -0800 Subject: [PATCH] Some more resilience to errors in creating vbds etc; still needs more work to tidy up things properly (e.g. the store state). Signed-off-by: Steven Hand --- linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c index 17760646ab..bf9817a8f0 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c @@ -170,6 +170,7 @@ static void backend_changed(struct xenbus_watch *watch, const char *node) be->blkif = alloc_blkif(be->frontend_id); if (IS_ERR(be->blkif)) { + /* XXX SMH: should free blkif here... hmm */ err = PTR_ERR(be->blkif); be->blkif = NULL; xenbus_dev_error(dev, err, "creating block interface"); @@ -178,6 +179,8 @@ static void backend_changed(struct xenbus_watch *watch, const char *node) err = vbd_create(be->blkif, handle, be->pdev, be->readonly); if (err) { + /* XXX SMH: should free blkif here too... */ + be->blkif = NULL; xenbus_dev_error(dev, err, "creating vbd structure"); return; } -- 2.30.2